function addEvent(D,C,A){if(D.addEventListener){D.addEventListener(C,A,false);return true}else{if(D.attachEvent){var B=D.attachEvent("on"+C,A);return B}else{return false}}}function removeEvent(E,D,B,A){if(E.removeEventListener){E.removeEventListener(D,B,A);return true}else{if(E.detachEvent){var C=E.detachEvent("on"+D,B);return C}else{alert("Handler could not be removed")}}}function getViewportHeight(){if(window.innerHeight!=window.undefined){return window.innerHeight}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientHeight}if(document.body){return document.body.clientHeight}return window.undefined}function getViewportWidth(){if(window.innerWidth!=window.undefined){return window.innerWidth}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientWidth}if(document.body){return document.body.clientWidth}return window.undefined};